// ruoyi-ui/src/utils/upload.js
export default {
    data() {
      return {
        showImage: false,
        showImageUrl: '',
        showBusiness:false,
        showBusinessUrl:''
      }
    },
    methods: {
      handlePictureCardPreview(file, type) {
        console.log('handlePictureCardPreview', file, type);
        this.$nextTick(() => {
          this.showImageUrl = file.response.url
          this.showImage = true
        })
      },
      
      handleRemove(file, fileList, type) {
        console.log('handleRemove', file, fileList, type);
        this.$set(this.form, type, null);
      },
      
      handleAvatarSuccess(res, file, type) {
        console.log('this.form==>', this.form)
        console.log('handleAvatarSuccess', res, file, type);
        this.$set(this.form, type, res.url);
      },
      
      handleProgress(event, file, type) {
        console.log('handleProgress', event, file, type);
        this.$set(this.form, type, null);
      },
      handleBusinessPreview(url){
        this.showBusinessUrl = url
        this.showBusiness = true
      }
    }
  }